package string_test;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;


public class Byte2Str {
    public static void main(String[] args) throws Exception{
//        byte[] data = new byte[] {97,98,99};
//        String str = new String(data);
//        System.out.println(str);
        String str = "你好中国";
        byte[] data = str.getBytes();
        System.out.println(Arrays.toString(data));

//        byte[] data1 = str.getBytes("gbk");
//        System.out.println(Arrays.toString(data));
//        System.out.println(Arrays.toString(data1));
    }
}